# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Ferass El Hafidi <funderscore@postmarketos.org>
pkgname=device-bananapi-bpi-cm4-cm4io
pkgdesc="BananaPi BPI-CM4IO Baseboard with BPI-CM4"
pkgver=1
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base u-boot-amlogic-bananapi-bpi-cm4-cm4io soc-amlogic-s905 linux-postmarketos-amlogic"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="deviceinfo modules-initfs"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="vdec firmware"
	depends="linux-firmware-meson"
	mkdir "$subpkgdir"
}

sha512sums="
86d5fa7949be1199361f76ba91704ff9d70f2a8cd68bf927bbded3b7592c1ada240762385c02320c42f763a8c92c4c1c578540655b3baf0e108b30f37b01fce6  deviceinfo
52948c2884a6f6384e12b7a598f70878526d0d3293c214425170145231144ec7de805c038641741a4a5d75b50e554f6a3fa3769784a674217ed032f9b6a233c8  modules-initfs
"
